package com.kaoshi.myweb.webstruts.controller;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.ExceptionMapping;
import org.apache.struts2.convention.annotation.ExceptionMappings;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;

import com.opensymphony.xwork2.ActionSupport;

@ParentPackage("struts-abstract")
@Namespace("/anno")
@Results( { @Result(name = "success", location = "/main.jsp"), 
    @Result(name = "error", location = "/error.jsp") }) 
@ExceptionMappings( { @ExceptionMapping(exception = "java.lange.RuntimeException", result = "error") })
public class AnnoAction extends ActionSupport {
	
	@Action( value = "execute", results = {@Result(name="success", location="/WEB-INF/Views/parabind/fielddriven.jsp", type = "dispatcher")})
	public String execute() throws Exception {
		return super.execute();
	}
}
